package com.xf.lastmall.order.api.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @author YANGSONG103
 */
@Data
public class OrderDetailVo implements Serializable {

    private static final long serialVersionUID = -173633973140124256L;

    @ApiModelProperty(value = "一点万象新订单老订单标识 0: 老订单 1：新订单")

    private int epoch;
    @ApiModelProperty(value = "售卖价格")
    private String salePrice;

    @ApiModelProperty(value = "订单编号")
    private String orderNo;

    @ApiModelProperty(value = "币种 积分/RMB")
    private int currency;

    @ApiModelProperty(value = "允许支付的剩余时间（单位秒）")
    private long timeOutStamp;

    @ApiModelProperty(value = "自动确认收货剩余秒（单位秒）")
    private long autoConfirmStamp;

    @ApiModelProperty(value = "商品是否可以退款，是否支持退款，1支持，0不支持")
    private int isCanRefund;

    @ApiModelProperty(value = "订单总金额")
    private String sumTotalAmount;

    @ApiModelProperty(value = "创建时间")
    private String createTime;

    @ApiModelProperty(value = "支付渠道名称")
    private String payTypeName;

    @ApiModelProperty(value = "支付类型")
    private Integer payType;

    @ApiModelProperty(value = "支付时间，格式为yyyy-mm-dd HH:mm:ss")
    private String payTime;

    @ApiModelProperty(value = "支付单号")
    private String payNo;

    @ApiModelProperty(value = "订单状态")
    private String orderStatus;

    @ApiModelProperty(value = "type=4 拼团购买时 拼团订单的状态")
    private String businessStatus;

    @ApiModelProperty(value = "可以退款的，未核销件数大于0，显示申请退款按钮")
    private int unConsumeNum;

    @ApiModelProperty(value = "订单退款初审件数，大于0则显示取消退款按钮和退款详情按钮")
    private int refundExamineNum;

    @ApiModelProperty(value = "退款中的件数，大于0显示退款详情按钮")
    private int refundNum;

    @ApiModelProperty(value = "已核销件数，大于0显示核销记录")
    private int consumedNum;

    @ApiModelProperty(value = "总的件数")
    private int num;

    @ApiModelProperty(value = "订单的类型业务id，type为1,2,4，5时表示gbId，type为3时表示套餐id")
    private String bizId;

    private int canRefundNum;

    private List<GoodsOrderConsumeVo> consumeInfos;

    private List<GoodsVo> goods;

//    private GroupInfoAppVo groupbuyingInfo;

    private BigDecimal payDiscountAmount;

    private BigDecimal leftPayDiscountAmount;

    private String merchantCode;

    private String activityId;

    @ApiModelProperty(value = "是否可点击商品详情（旧数据迁移过来的无法点击商品详情）")
    private int isGoodDetailCanClick;

    @ApiModelProperty(value = "积分兑礼失败原因 订单状态要是失败的时候才查询，否则为null")
    private String consumePointErrorMsg;

    @ApiModelProperty(value = "店铺名称")
    private String merchantName;

    @ApiModelProperty(value = "配送方式")
    private Integer deliveryWay;

    private Integer saleyWay;

    private String deliveryWayLabel;

    @ApiModelProperty(value = "买家留言")
    private String remark;

    @ApiModelProperty(value = "收货人姓名")
    private OrderContactVo contactInfo;

    @ApiModelProperty(value = "落地页跳转地址")
    private String nativeURL;

    @ApiModelProperty(value = "拒绝退款提示语")
    private String refundRejectMsg;

    @ApiModelProperty(value = "商场名称/项目名称")
    private String mallName;

    /**
     * @see OrderType
     */
    @ApiModelProperty(value = "订单类型")
    private int type;

    @ApiModelProperty(value = "订单平台")
    private String platform;

    private String orderSubNo;

    private String transNo;

    private boolean hasRefunded;

    @ApiModelProperty("当前订单是否正在售后中")
    private Boolean isReturn;

    @ApiModelProperty("当前订单商品是否全部申请售后或售后完成")
    private Boolean isAllReturn;

    @ApiModelProperty(value = "买家昵称")
    private String memberName;


    @ApiModelProperty(value = "发票信息")
    private OrderInvoiceVo invoiceInfo;

    @ApiModelProperty(value = "物流信息")
    private OrderLogisticsVo logisticsInfo;

    /**
     * 是否支持配送:用于非物流配送的商品前端隐藏物流和发票模块
     */
    private boolean enableLogistics;
    /**
     * 项目编码
     */
    private String mallCode;
    /**
     * 订单完成/关闭时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date closeTime;
    /**
     * 订单修改时间
     */
    private Date updateTime;


}
